Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite max/min voltage to save memory #91

Merged
merged 1 commit into from
Nov 11, 2023

Conversation

dalathegreat
Copy link
Owner

@dalathegreat dalathegreat commented Nov 11, 2023

What

This PR removes all inverter specific max/min voltage limits, they all use the common one set at startup instead.

How

All inverter types now use the same max_voltage and min_voltage. Previously I didn't get this to work due to casting them as const.

Why

This both saves memory, and makes it easier to add new inverter protocols in the future

@dalathegreat dalathegreat requested a review from Newevg November 11, 2023 21:26
@Newevg
Copy link
Collaborator

Newevg commented Nov 11, 2023

Confirming min/max voltage settings with Sungrow SH10RT

@dalathegreat dalathegreat merged commit 2295d88 into main Nov 11, 2023
30 checks passed
@dalathegreat dalathegreat deleted the improvement/defines-voltage branch November 12, 2023 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants